﻿using Lua4Net;

namespace MessageSystem.Managed.LuaRpc
{
    class LuaCallback
    {
        private LuaRefFunction _function;

        public LuaCallback(LuaRefFunction func)
        {
            _function = func;
        }

        public void Callback(string s)
        {
            LuaManager.Instance.Call(_function, s);
            _function.Dispose();
            _function = null;
        }
    }
}
